FROM m.daocloud.io/docker.io/library/golang:1.18

ENV GOPROXY https://proxy.golang.com.cn,direct
WORKDIR /app
COPY . /app
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main -v

EXPOSE 5001
CMD ["/app/main"]

# docker build -t webhook:v0.0.1 .
# docker tag webhook:v0.0.1 hub.abc.com/basic/webhook:v0.0.1
# docker push hub.abc.com/basic/webhook:v0.0.1

# docker run --net=host  hub.abc.com/basic/webhook:v0.0.1
# docker run hub.abc.com/basic/webhook:v0.0.1 -p 5001:5001